package com.shi.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import com.shi.service.ShiUserService;
import com.shi.entity.ShiUser;

/**
 * ShiUser的路由接口服务
 * 
 * @author 
 *
 */
@RestController
@RequestMapping("/user")
public class ShiUserController {

	/** ShiUserService服务 */
	@Autowired
	private ShiUserService shiUserService;
	
	/**
	 * 查询所有ShiUser数据的方法
	 * @param value
	 * @return
	 */
	@PostMapping(value = "/find", produces = {"application/json;charset=UTF-8"})
	public String find(ShiUser value) {
		return shiUserService.find(value);
	}
	
	
	/**
	 * 插入ShiUser属性不为空的数据方法
	 * @param id
	 * @return
	 */
	@PostMapping(value = "/save", produces = {"application/json;charset=UTF-8"})
	public String save(@RequestBody ShiUser value) {
		return shiUserService.saveNotNull(value);
	}

}
